<template>
  <div>
    <el-row>
      <el-carousel height="500px" width="100%" style="margin-top:-20px;">
        <el-carousel-item v-for="img in images" :key="img.src">
          <a :href="img.link"><img :src="img.src" style="width:100%"></a>
        </el-carousel-item>
      </el-carousel>
    </el-row>
  </div>
</template>
<script>
export default {
  data () {
    return {
      images: []
    }
  },
  methods: {
  },
  mounted () { // 页面挂载的时候通过远程服务器获取要展示的数据内容
    this.images = [
      {src: '/static/images/carousel/a.png', link: '/'},
      {src: '/static/images/carousel/b.png', link: '/'}]
  }
}
</script>
<style scoped>
</style>
